package faf.web.data;

import faf.entities.Survey;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;

public class CreateSurveyFormValidator implements Validator {

	@Override
	public boolean supports(Class clazz) {
		return Survey.class.equals(clazz);
	}

	@Override
	public void validate(Object object, Errors errors) {

		Survey survey = (Survey) object;
		ValidationUtils.rejectIfEmptyOrWhitespace(errors, "title",
				"value-required");
		
	

	}
}
